/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package PlayBoxWS;

import BusinessLayer.BusinessLayerInterface;
import BusinessLayer.BusinessLayerInterfaceHandler;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author zorr
 */
@WebService(serviceName = "PlayBoxWS")
public class PlayBoxWS {

    /** This is a sample web service operation */
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }

    @WebMethod(operationName = "getGameList")
    public String getGameList(@WebParam(name = "username") String username,
            @WebParam(name = "passwort") String password) {
        BusinessLayerInterface bli = BusinessLayerInterfaceHandler.getInstance();
        return bli.getGameList(username, password);
    }

    @WebMethod(operationName = "getGame")
    public String getGame(@WebParam(name = "name") String username,
            @WebParam(name = "gameId") int gameId) {
        BusinessLayerInterface bli = BusinessLayerInterfaceHandler.getInstance();
        return bli.getGame(username, gameId);
    }

    @WebMethod(operationName = "getLicense")
    public String getLicense(@WebParam(name = "name") String username,
            @WebParam(name = "gameId") int gameId) {
        BusinessLayerInterface bli = BusinessLayerInterfaceHandler.getInstance();
        return bli.getLicense(username, gameId);
    }

    @WebMethod(operationName = "getMyGames")
    public String getMyGames(@WebParam(name = "name") String username) {
        BusinessLayerInterface bli = BusinessLayerInterfaceHandler.getInstance();
        return bli.getMyGames(username);
    }

    @WebMethod(operationName = "buyGame")
    public String buyGame(@WebParam(name = "name") String username,
            @WebParam(name = "gameId") int gameId) {
        BusinessLayerInterface bli = BusinessLayerInterfaceHandler.getInstance();
        return bli.buyGame(username, gameId);
    }

}
